from django.db import models
import datetime


# Create your models here.


class UserModel(models.Model):
    username = models.CharField(max_length=255)
    password = models.CharField(max_length=255)
    password = models.CharField(max_length=255)
    status = models.SmallIntegerField(default=0)

    class Meta:
        db_table = "version_user"  # 更改表名

    def to_json(self):
        pass


class GoodModel(models.Model):
    name = models.CharField(max_length=255)
    price = models.FloatField()
    user = models.ForeignKey(UserModel, default=1, related_name='own_user')

    class Meta:
        db_table = 'version_goods'





